package com.lucky.ebidding.service.interfaces;

import com.lucky.ebidding.dto.ZbInfoAndModify;
import com.lucky.ebidding.model.User;
import com.lucky.ebidding.model.ZbInfo;
import com.lucky.ebidding.model.ZbModify;

import java.util.List;

/**
 * ClassName:ZbServiceI
 * Package:com.lucky.ebidding.service.interfaces
 * Description:
 *
 * @Date:2020/3/18 14:14
 * @Author:857251389@qq.com
 */
public interface ZbServiceI {
    /**
     * 插入招标
     * @param zbInfo
     */
    void insert(ZbInfo zbInfo);

    List<ZbInfo> selectAll();

    List<ZbInfo> selectByUserId(Integer id);

    ZbInfo selectById(Integer id);

    List<ZbInfo> selectZbInfoByUserId(Integer id);

    int InsertPublishInfo(Integer zbId,Integer tbId);

    List<ZbInfo> selectByKbFlag(int i);

    int setStatus(Integer status, Integer zbId);

    List<ZbInfo> selectByShFlag(int i);

    int uppdateKbFlag(Integer zbId);

    List<ZbInfo> selectByShFlagAndKbFlag(int i, int i1);

    /**
     * 插入修改审核
     * @param zbModify
     */
    void insertZbModify(ZbModify zbModify);

    /**
     * 查询招标项目及修改表
     * @return
     */
    List<ZbInfoAndModify> selectZbInfoAndZbModify();

    /**
     * 查询招标项目及已审核的修改表
     * @param shFlag
     * @return
     */
    List<ZbInfoAndModify> selectZbInfoAndZbModifyByShFlag(Integer shFlag);

    /**
     * 查询招标项目及已审核的修改表
     * @param zbId
     * @return
     */
    List<ZbInfoAndModify> selectZbInfoAndZbModifyByzbId(Integer zbId);

    /**
     * 更新修改审核表状态，并向招标人发送通知
     * @param status
     * @param zbId
     * @param modifyId
     * @param user
     * @return
     */
    int setZbModifyStatus(Integer status, Integer zbId,Integer zbUsedId, Integer modifyId, User user);

    /**
     * 判断是否审核通过
     * @param zbId
     * @return
     */
    int isSh(Integer zbId);
}
